Conversation
3869b08 to
b229b82
Compare
d7a6ec3 to
92d3b77
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new end-to-end technical guide intended to help integrators implement the full Procore Document Management (PDM) V2 upload + revision submission workflow, with scenario-based sequencing and error-handling guidance.
Changes:
- Replaces the placeholder technical guide with a detailed 8-step upload/submission workflow, integration patterns, examples, and an error reference.
- Adds a new “Constructing the Fields Array for API Requests” section to the metadata details reference to standardize how integrators format metadata payloads.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
document_management_integration/document_management_technical_guide.md |
Adds the comprehensive step-by-step PDM V2 upload/revision technical guide, including examples and error reference tables. |
document_management_integration/document_management_metadata_details.md |
Adds guidance + a quick reference table for constructing fields arrays used in Document Uploads POST/PATCH payloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_metadata_details.md
Outdated
Show resolved
Hide resolved
92d3b77 to
9a2adf3
Compare
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_api_endpoints.md
Outdated
Show resolved
Hide resolved
33d8406 to
4e3598b
Compare
|
|
||
| Push your binary file to Procore's storage service. Because file storage and document metadata are handled by separate microservices, this step requires you to step outside the V2 Document Management endpoints and use the V2.1 Unified Uploads API. The purpose of this step is to get your file into Procore's storage and obtain the `upload_id` field from the response, which is referred to as `file_upload_id` in subsequent steps. This ID is the critical link between your binary file and the document upload record you created in Step 4. | ||
|
|
||
| For full request/response details, authentication requirements, and multipart uploads, see the Unified Uploads API *(documentation coming soon)*. |
There was a problem hiding this comment.
Can we add a placeholder curl or HTTP example showing the request shape (e.g., endpoint, headers, multipart body), even if it's marked as preliminary? A "coming soon" note without actionable guidance breaks the workflow for anyone following this end-to-end.
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_api_endpoints.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
|
|
||
| The show response includes `latest_event_id` for every upload. Save this value — you must pass it as `upload_latest_event_id` when submitting in Step 8. If you don't need ML-enriched metadata, grab this ID and proceed to step 8. | ||
|
|
||
| **2. Check async processing status** |
There was a problem hiding this comment.
Would it be worth adding some guidance around polling here? Maybe something like "poll every 5–10 seconds with exponential backoff with a timeout of 5 minutes"? We know how our systems behave and their approximate latencies (most of the time), so I think it would be helpful to pass this knowledge to integrators.
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
|
|
||
| Step 5 (binary file upload) can be performed before or after Step 4 (initialize document upload records). Both steps must be completed before Step 6 (Patch document uploads). | ||
| Keep batches to 100 items or fewer in Steps 4, 6, and 8 as larger payloads increase the risk of timeouts and make partial-failure recovery more complex. | ||
| If you need to process more than 100 documents, it is recommeneded to split them into sequential batches. |
There was a problem hiding this comment.
Based on discussion in slack here. Need to verify once performance testing is done with PDM Pilot API.
|
|
||
| Two background processes may auto-populate fields after `upload_status` is set to `COMPLETED`: | ||
|
|
||
| - **ML** (PDF files only) — Procore analyzes file content and may populate fields such as Type, Description, Number, Revision, and Date Authored. Check `integrationStatuses.ML` — once it reaches `completed` or `error`, ML processing is finished. There is no webhook for ML completion; you can poll the show endpoint to detect ML status. ML typically finishes within 10–30 seconds. It is recommended that you start polling 5 seconds after setting upload_status to COMPLETED, then repeat every 5–10 seconds. Stop when both integrationStatuses.ML and integrationStatuses.FILENAME_SCRAPING report completed or error, or after 3 minutes — whichever comes first. If the timeout is reached, proceed with patching metadata fields manually. For details on which fields ML populates, precedence rules, and limitations, see [ML and Automated Features]({{ site.url }}{{ site.baseurl }}{% link document_management_integration/document_management_intro.md %}#machine-learning-ml-and-automated-features). |
There was a problem hiding this comment.
3 min suggestion based on ML_SPINNER_TIMEOUT_IN_MIN in doc-control-ui-service for how long the browser waits for ML processing
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
document_management_integration/document_management_technical_guide.md
Outdated
Show resolved
Hide resolved
|
|
||
| Push your binary file to Procore's storage service using the **V2.1 Unified Uploads API**. As file storage and document metadata are handled by separate services, this step requires you to step outside the V2 Document Management endpoints. The file upload flow includes: **POST** to initialize the upload session and receive presigned URLs, **PUT** to push bytes directly to storage, then **PATCH** to complete. The `upload_id` returned by POST is what you pass as `file_upload_id` in Step 6. | ||
|
|
||
| > **Documentation in progress:** The V2.1 Unified Uploads API reference is not yet published. The examples below reflect the designed API contract. |
There was a problem hiding this comment.
non-blocking: should this be in a more prominent location, like a banner at the top of the page? It seems important to note that one of the APIs we/integrators depend on is subject to change.
There was a problem hiding this comment.
Good callout. I think we will be able to get the documentation linked here since Ajay is planning to have that wrapped up this week.
#340
Created a ticket to update document management documentation once the Unified Upload documentation has been published.
https://procoretech.atlassian.net/browse/DOCINT-1340
|
|
||
| **3. Verify all required metadata** | ||
|
|
||
| Inspect the `fields` array to confirm all required fields are populated, either by you or by ML, before proceeding. |
There was a problem hiding this comment.
non-blocking: can we specify whether the fields array is paginated? That way, integrators know whether all fields are returned, or if they need to paginate, before validating required fields.
There was a problem hiding this comment.
Added clarification.
a16627d to
275a950
Compare
275a950 to
da4aa96
Compare
| **Step 1: Initialize Document Upload** - Create a Document Upload by providing filename and mime type. The system returns a unique upload ID. | ||
|
|
||
| **Step 2: Upload Binary File** - Use the [File Uploads API]({{ site.url }}{{ site.baseurl }}{% link tutorials/tutorial_uploads.md %}) to put the binary in storage. The Uploads API returns a file upload ID that identifies your file in storage. | ||
| **Step 2: Upload Binary File** - Use the **V2.1 Unified Uploads API** to put the binary in storage. The response includes a file upload ID (`upload_id`) that identifies your file in storage for the next step. **Public API reference documentation for V2.1 Unified Uploads is not available yet** (it is in progress on [developers.procore.com](https://developers.procore.com)); for illustrative request and response shapes see [Step 5: Upload the Binary File]({{ site.url }}{{ site.baseurl }}{% link document_management_integration/document_management_technical_guide.md %}#step-5-upload-the-binary-file) in the Technical Guide. |
There was a problem hiding this comment.
I have a ticket to update this section with the Unified Uploads documentation once this PR is merged
https://procoretech.atlassian.net/browse/DOCINT-1340
|
|
||
| **Resolving `WORKFLOW_CONFLICT`:** | ||
| When submitting uploads that may supersede or close out existing document revision workflows, you can optionally terminate those workflows as part of the submission. To terminate existing workflows safely, always send the latest `upload_latest_event_id` for each upload and provide: | ||
| **`termination_reason`** a human-readable reason for terminating the existing workflows (e.g., `"Superseded"`, `"Replaced by new revision"`) |
There was a problem hiding this comment.
non-blocking: looks like there's a minor Markdown formatting issue that prevents this from rendering a bulleted list.
Jira Ticket:
🎫 DOCINT-1073
Adds a comprehensive step-by-step technical guide for API integrators building against the Procore Document Management V2 API.
Covers: